home *** CD-ROM | disk | FTP | other *** search
/ MACD 5 / MACD 5.bin / workbench / commodity / newchange / install < prev    next >
Text File  |  1997-04-25  |  3KB  |  174 lines

  1. ; *******************************************************************
  2. ;
  3. ; $VER: Install_NewChange 1.3 (25.4.97)
  4. ; Install script for NewChange copyright © 1996-1997 Martin Wulffeld
  5. ;
  6. ; *******************************************************************
  7.  
  8. (set old_level @user-level)
  9. (set @default-dest "")
  10.  
  11. (set default_lang 64)
  12.  
  13. (set #bad-kick
  14. (cat "You must at least have Kickstart 3.0 to install NewChange!"
  15. ))
  16.  
  17. (set #copying-reqtools        "\nCopying reqtools.library 38.1436 to LIBS:...")
  18. (set #copying-newchangeexe    "\nCopying NewChange executable...")
  19. (set #copying-documentation    "\nCopying NewChange documentation...")
  20. (set #copying-regfiles        "\nCopying registration files...")
  21. (set #copying-catalogs        "\nCopying catalogs...")
  22. (set #select-dest            "Please select the path where you want to install NewChange. A drawer named NewChange will be created there.")
  23. (set #select-destguide        "Please select the path where you want to install the NewChange documentation. It has already been installed along with the main program.")
  24. (set #select-language       "Which languages should be installed?")
  25.  
  26. ;=============================================================================
  27. ; Make sure we are running under a 3.0 ROM
  28.  
  29. (if (< (/ (getversion) 65536) 39)
  30. (
  31.     (abort #bad-kick)
  32. ))
  33.  
  34. ;=============================================================================
  35.  
  36. ;*** Required libraries
  37.  
  38. (copylib
  39.     (prompt #copying-reqtools)
  40.     (help @copylib-help)
  41.     (source "Libs/reqtools.library")
  42.     (dest "LIBS:")
  43.     (confirm)
  44. )
  45.  
  46. ;*** NewChange executable
  47.  
  48. (set programdir
  49.     (tackon
  50.         (askdir
  51.             (prompt #select-dest)
  52.             (help @askdir-help)
  53.             (default "SYS:")
  54.             (newpath)
  55.         )
  56.         "NewChange"
  57.     )
  58. )
  59.  
  60. (set @default-dest programdir)
  61.  
  62. (copyfiles
  63.     (prompt #copying-newchangeexe)
  64.     (source "NewChange")
  65.     (dest programdir)
  66.     (infos)
  67. )
  68.  
  69. ;*** Copy Catalogs to NewChange dir for backup
  70.  
  71. (copyfiles
  72.     (prompt #copying-catalogs)
  73.     (source "")
  74.     (dest programdir)
  75.     (pattern "Catalogs#?")
  76. )
  77.  
  78. ;*** Copy registration files
  79.  
  80. (copyfiles
  81.     (prompt #copying-regfiles)
  82.     (source "")
  83.     (dest programdir)
  84.     (pattern "Registration#?")
  85. )
  86.  
  87. ;*** Documentation files
  88.  
  89. ; Backup
  90.  
  91. (copyfiles
  92.     (prompt #copying-documentation)
  93.     (source "")
  94.     (dest programdir)
  95.     (pattern "Documentation#?")
  96. )
  97.  
  98. ; Ask if documentation should be installed elsewhere
  99.  
  100. (set tempdocdir
  101.     (tackon
  102.         programdir
  103.         "Documentation"
  104.     )
  105. )
  106.  
  107. (set docdir
  108.     (askdir
  109.         (prompt #select-destguide)
  110.         (help @askdir-help)
  111.         (default tempdocdir)
  112.         (newpath)
  113.     )
  114. )
  115.  
  116. (copyfiles
  117.     (prompt #copying-documentation)
  118.     (source "Documentation/NewChange.guide")
  119.     (dest docdir)
  120.     (infos)
  121. )
  122.  
  123. ;*** Install locale file
  124.  
  125. (if (exists "SYS:Locale")
  126. (
  127.     (if (exists "LOCALE:")
  128.     (
  129.         (set lang (askoptions (prompt #select-language)
  130.                                 (help #which-language-help)
  131.                                 (choices
  132.                                     "Dansk"
  133.                                     "Italiano"
  134.                                     "Nederlands"
  135.                                     "Norsk"
  136.                                     "Suomi"
  137.                                     "Svenska"
  138.                                     "English")
  139.                                 (default default_lang)
  140.                     )
  141.         )
  142.         
  143.         (set n 0)
  144.         (while
  145.             (set language (select n
  146.                                 "dansk"
  147.                                 "italiano"
  148.                                 "nederlands"
  149.                                 "norsk"
  150.                                 "suomi"
  151.                                 "svenska"
  152.                                 "")
  153.             )
  154.         (
  155.             (if (IN lang n)
  156.             (
  157.                 (if (< n 7)
  158.                 (
  159.                     (makedir (cat "LOCALE:Catalogs/" language))
  160.                     (copyfiles (source (cat "Catalogs/" language))
  161.                                 (dest (cat "LOCALE:Catalogs/" language))
  162.                                 (all)
  163.                     )
  164.                 ))
  165.             ))
  166.             (set n (+ n 1))
  167.         ))
  168.     ))
  169. ))
  170.  
  171. (exit "Please reboot or flush your memory. Some older versions of the installed files might be present in memory."
  172. )
  173.